<!-- <template>

  <div>
    <h1>MemberContainer</h1>
    <ul class="Member_ul">
      <li v-for="item in list">
        {{item.name}}
      </li>
    </ul>

  </div>
</template>

<script>
  export default {
    data() {
      return {
//        list:[
//
//        ]
      }
    },
   created(){
     this.getName();
   },
    methods:{
      getName(){
        this.$http.get('https://easy-mock.com/mock/5d484a0763a13f62ea2f3f3a/www.hongli.com/waimai')
        .then(res=>{
          console.log(res.data);

        })
      }
    }
  }
</script>

<style>

  .Member_ul {
    width: 100%;
  }

  .Member_ul li {
    float: left;
  }
  ul li {
    width: 100%;
    list-style: none;
  }
</style>
 -->

<template>

  <div>
    <h1>MemberContainer</h1>
    <ul class="Member_ul">
      <li v-for="item in list">
        {{item.name}}
      </li>
    </ul>

  </div>
</template>

<script>
  export default {
    data() {
      return {
        list:[]
      }
    },
   created(){
     this.getName();
   },
    methods:{
      getName(){
        this.$http.get('https://easy-mock.com/mock/5d484a0763a13f62ea2f3f3a/www.hongli.com/waimai').then(res=>{
          console.log(res.data);
          this.list = res.data;
             console.log(res.data);
        })
      }
    }
  }
</script>

<style>

  .Member_ul {
    width: 100%;
  }

  .Member_ul li {
    float: left;
  }
  ul li {
    width: 100%;
    list-style: none;
  }
</style>
